﻿CREATE VIEW [acms].[TopicGroup_View]
AS 
	SELECT
		Id, 
		SiteId,
		[Name],
		[Path],
		[Notes],
		(Select Count(Id) From Topics where TopicGroupId = TopicGroup.Id and Deleted = 0) as TopicCount,
		Created,
		ConcurencyId
	FROM TopicGroup
	Where Deleted = 0
;